<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  	<script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js">
	</script>
    <base href="<%=basePath%>">
    <!-- 团支书 -->
    <title>接受反馈</title>
    <meta name="viewport" content="width=device-width,initial-scale=1" />
	<link rel="stylesheet" type="text/css" href="css/f/navs.css">
	<link rel="stylesheet" type="text/css" href="css/f/default.css">
	<link rel="stylesheet" type="text/css" href="css/f/assignment.css"/>
	<script src="js/jquery.min.js"></script>
	<script src="js/f/default.js?ver=1"></script>
</head>

<body>
	<div class="all">
		<jsp:include page="/nav.jsp"></jsp:include>
        <div class="rightall float-left">
        	<input type="hidden" value="${error_msg }" name="errorMsg" />
        	 	<div class="already">
	                <div class="already-title">
	        			<div class="left">入党申请</div>
	        		</div>
       			 <table>
  					<tr class="tr-style-head">
	  					<td>申请人</td>
	  					<td>班级</td>
	  					<td>申请理由</td>
	  					<td>申请时间</td>
	  					<td>状态</td>
	  					<td>操作</td>
  					</tr>
  				<c:forEach var ="b" items="${application}">
  					<tr>
  						<td>${b.stuName}</td>
	  					<td>${b.stuClassName}</td>
	  					<td id="b" style="position:relative;">${b.applicationContent}</td>
	  					<td>
	  						<fmt:formatDate value="${b.createTime}" pattern="yyyy年MM月dd日"/>
	  					</td>
	  					<td>
		  					<c:if test="${b.applicationState==1}"> <span style="color:#446EE6;">申请中</span> </c:if>
		  					<c:if test="${b.applicationState==2}"> 已通过</c:if>
		  					<c:if test="${b.applicationState==3}"> <span style="color:red;">拒绝</span> </c:if>
	  					</td>
  						<c:if test="${b.applicationState==1}">
  							<td>
  								<a href="javascript:void(0)" style="color:#446EE6;" onclick="yy('请确认同意该申请','applyState.do',this)" value="pid=${b.applicationInfoId }" requiredValue="applyState=2">同意</a>
  								<a href="javascript:void(0)" style="color:#446EE6;" onclick="yy('请确认拒绝该申请','applyState.do',this)" value="pid=${b.applicationInfoId }" requiredValue="applyState=3">拒绝</a>
  							</td>
  						</c:if>
  						<c:if test="${b.applicationState!=1}">
  							<td><a style="color:#bbb" href="javascript:void(0)">同意</a>&nbsp;<a style="color:#bbb" href="javascript:void(0)">拒绝</a></td>
  						</c:if>
  					</tr>
	  			</c:forEach>
	  			</table>
	  			 <c:if test="${size > 1 }">
               		<div class="previous">
	               		<c:if test="${pageNo>1}">
	                    	<a href="cadre/apply.do?pageNo=${pageNo-1}">上一页</a>
	                	</c:if>
	                   	<c:forEach var="p" begin="1" end="${size }" step="1">
	                   		<c:if test="${p==pageNo }">
	                   			<span style="font-size:18px;color:#446ee6;">&nbsp;${p}&nbsp;</span>
	                   		</c:if>
	                   		<c:if test="${p!=pageNo }">
	                   			<a href="cadre/apply.do?pageNo=${p}" >&nbsp;${p}&nbsp;</a>
	                   		</c:if>
	                   	</c:forEach>
	                    <c:if test="${pageNo<size}">
	                    	<a href="cadre/apply.do?pageNo=${pageNo+1}">下一页</a>
	                	</c:if>
                   </div>
                </c:if>	
              <!-- <div class="float-right excel"><button name="" class="btn-style">导出文件</button></div> -->
       		</div>
     	 </div>
      </div> 			
  </body>
</html>
